package com.shop.cereshop.app.dl.logic.exception;

import lombok.Getter;

/**
 * @description 自定义异常类
 * @Author YF
 * @Date 日期:2021/4/13 时间:19:07
 */
@Getter
public class DlException extends RuntimeException {

    private Integer code; //响应状态码

    public DlException(Integer status, String message) {
        super(message);
        this.code = status;
    }

    public DlException(ExceptionEnum exceptionEnum) {
        super(exceptionEnum.getMessage());
        this.code = exceptionEnum.getStatus();
    }
}

